package com.siam.package_order.feign;

import com.alibaba.fastjson.JSONObject;
import com.siam.package_common.entity.BasicResult;
import com.siam.package_weixin_pay.entity.TransferToUserRequest;
import com.siam.package_weixin_pay.entity.TransfersDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(value = "order-siam")
public interface WxPayFeignApi {

    /**
     * 企业付款到零钱【已废弃，微信官方不再支持该功能】
     */
    /*@PostMapping(value = "/api/WxPay/payToBalance")
    BasicResult<Boolean> payToBalance(@RequestBody TransfersDto model);*/

    /**
     * 商家转账到零钱(企业付款到零钱替代方案)
     */
    @PostMapping(value = "/api/WxPay/payToBalanceV3")
    BasicResult<JSONObject> payToBalanceV3(@RequestBody TransferToUserRequest request);
}